package day07;

import java.io.FileNotFoundException;
import java.io.RandomAccessFile;

public class Test2 {

	public static void main(String[] args) throws Exception {
		String name="abc/airplane.png";
		String name1="abc/airplane1.png";
		RandomAccessFile raf=new RandomAccessFile(name,"rw");
		RandomAccessFile raf1=new RandomAccessFile(name1,"rw");
		
		byte[]bytes=new byte[1024];
		int b;
		while((b=raf.read(bytes))!=-1){
			raf1.write(bytes);
			
		}
		
		raf.close();
		raf1.close();
		
		
	}

}
